3.39 \(\int \frac {(a+b \log (c x^n))^2 \log (d (\frac {1}{d}+f x^2))}{x^4} \, dx\)

Optimal. Leaf size=543 \[ -\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (1-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (\sqrt {-d} \sqrt {f} x+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (d f x^2+1\right )}{27 x^3}-\frac {52 b^2 d f n^2}{27 x} \]

[Out]

-52/27*b^2*d*f*n^2/x-4/27*b^2*d^(3/2)*f^(3/2)*n^2*arctan(x*d^(1/2)*f^(1/2))-16/9*b*d*f*n*(a+b*ln(c*x^n))/x-4/9
*b*d^(3/2)*f^(3/2)*n*arctan(x*d^(1/2)*f^(1/2))*(a+b*ln(c*x^n))-2/3*d*f*(a+b*ln(c*x^n))^2/x-2/27*b^2*n^2*ln(d*f
*x^2+1)/x^3-2/9*b*n*(a+b*ln(c*x^n))*ln(d*f*x^2+1)/x^3-1/3*(a+b*ln(c*x^n))^2*ln(d*f*x^2+1)/x^3+1/3*(-d)^(3/2)*f
^(3/2)*(a+b*ln(c*x^n))^2*ln(1-x*(-d)^(1/2)*f^(1/2))-1/3*(-d)^(3/2)*f^(3/2)*(a+b*ln(c*x^n))^2*ln(1+x*(-d)^(1/2)
*f^(1/2))-2/3*b*(-d)^(3/2)*f^(3/2)*n*(a+b*ln(c*x^n))*polylog(2,-x*(-d)^(1/2)*f^(1/2))+2/3*b*(-d)^(3/2)*f^(3/2)
*n*(a+b*ln(c*x^n))*polylog(2,x*(-d)^(1/2)*f^(1/2))-2/9*I*b^2*d^(3/2)*f^(3/2)*n^2*polylog(2,I*x*d^(1/2)*f^(1/2)
)+2/9*I*b^2*d^(3/2)*f^(3/2)*n^2*polylog(2,-I*x*d^(1/2)*f^(1/2))+2/3*b^2*(-d)^(3/2)*f^(3/2)*n^2*polylog(3,-x*(-
d)^(1/2)*f^(1/2))-2/3*b^2*(-d)^(3/2)*f^(3/2)*n^2*polylog(3,x*(-d)^(1/2)*f^(1/2))

________________________________________________________________________________________

Rubi [A]  time = 0.87, antiderivative size = 543, normalized size of antiderivative = 1.00, number of steps used = 24, number of rules used = 15, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.536, Rules used = {2305, 2304, 2378, 325, 203, 2351, 2324, 12, 4848, 2391, 2353, 2330, 2317, 2374, 6589} \[ -\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {PolyLog}\left (2,-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {PolyLog}\left (2,\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {PolyLog}\left (3,-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {PolyLog}\left (3,\sqrt {-d} \sqrt {f} x\right )-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (1-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (\sqrt {-d} \sqrt {f} x+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {2 b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (d f x^2+1\right )}{27 x^3}-\frac {52 b^2 d f n^2}{27 x} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)])/x^4,x]

[Out]

(-52*b^2*d*f*n^2)/(27*x) - (4*b^2*d^(3/2)*f^(3/2)*n^2*ArcTan[Sqrt[d]*Sqrt[f]*x])/27 - (16*b*d*f*n*(a + b*Log[c
*x^n]))/(9*x) - (4*b*d^(3/2)*f^(3/2)*n*ArcTan[Sqrt[d]*Sqrt[f]*x]*(a + b*Log[c*x^n]))/9 - (2*d*f*(a + b*Log[c*x
^n])^2)/(3*x) + ((-d)^(3/2)*f^(3/2)*(a + b*Log[c*x^n])^2*Log[1 - Sqrt[-d]*Sqrt[f]*x])/3 - ((-d)^(3/2)*f^(3/2)*
(a + b*Log[c*x^n])^2*Log[1 + Sqrt[-d]*Sqrt[f]*x])/3 - (2*b^2*n^2*Log[1 + d*f*x^2])/(27*x^3) - (2*b*n*(a + b*Lo
g[c*x^n])*Log[1 + d*f*x^2])/(9*x^3) - ((a + b*Log[c*x^n])^2*Log[1 + d*f*x^2])/(3*x^3) - (2*b*(-d)^(3/2)*f^(3/2
)*n*(a + b*Log[c*x^n])*PolyLog[2, -(Sqrt[-d]*Sqrt[f]*x)])/3 + (2*b*(-d)^(3/2)*f^(3/2)*n*(a + b*Log[c*x^n])*Pol
yLog[2, Sqrt[-d]*Sqrt[f]*x])/3 + ((2*I)/9)*b^2*d^(3/2)*f^(3/2)*n^2*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x] - ((2*I)
/9)*b^2*d^(3/2)*f^(3/2)*n^2*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x] + (2*b^2*(-d)^(3/2)*f^(3/2)*n^2*PolyLog[3, -(Sqrt[
-d]*Sqrt[f]*x)])/3 - (2*b^2*(-d)^(3/2)*f^(3/2)*n^2*PolyLog[3, Sqrt[-d]*Sqrt[f]*x])/3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 325

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(a*
c*(m + 1)), x] - Dist[(b*(m + n*(p + 1) + 1))/(a*c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2324

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 2330

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2378

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((g_.)*(x_))^(q_.),
 x_Symbol] :> With[{u = IntHide[(g*x)^q*(a + b*Log[c*x^n])^p, x]}, Dist[Log[d*(e + f*x^m)^r], u, x] - Dist[f*m
*r, Int[Dist[x^(m - 1)/(e + f*x^m), u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && IGtQ[p, 0
] && RationalQ[m] && RationalQ[q]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^4} \, dx &=-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-(2 f) \int \left (-\frac {2 b^2 d n^2}{27 x^2 \left (1+d f x^2\right )}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^2 \left (1+d f x^2\right )}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^2 \left (1+d f x^2\right )}\right ) \, dx\\ &=-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2 \left (1+d f x^2\right )} \, dx+\frac {1}{9} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2 \left (1+d f x^2\right )} \, dx+\frac {1}{27} \left (4 b^2 d f n^2\right ) \int \frac {1}{x^2 \left (1+d f x^2\right )} \, dx\\ &=-\frac {4 b^2 d f n^2}{27 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2}-\frac {d f \left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2}\right ) \, dx+\frac {1}{9} (4 b d f n) \int \left (\frac {a+b \log \left (c x^n\right )}{x^2}-\frac {d f \left (a+b \log \left (c x^n\right )\right )}{1+d f x^2}\right ) \, dx-\frac {1}{27} \left (4 b^2 d^2 f^2 n^2\right ) \int \frac {1}{1+d f x^2} \, dx\\ &=-\frac {4 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx-\frac {1}{3} \left (2 d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2} \, dx+\frac {1}{9} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx-\frac {1}{9} \left (4 b d^2 f^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{1+d f x^2} \, dx\\ &=-\frac {16 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {4 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (2 d^2 f^2\right ) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1-\sqrt {-d} \sqrt {f} x\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1+\sqrt {-d} \sqrt {f} x\right )}\right ) \, dx+\frac {1}{3} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx+\frac {1}{9} \left (4 b^2 d^2 f^2 n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f} x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1-\sqrt {-d} \sqrt {f} x} \, dx-\frac {1}{3} \left (d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+\sqrt {-d} \sqrt {f} x} \, dx+\frac {1}{9} \left (4 b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (2 b (-d)^{3/2} f^{3/2} n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx+\frac {1}{3} \left (2 b (-d)^{3/2} f^{3/2} n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{x} \, dx+\frac {1}{9} \left (2 i b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx-\frac {1}{9} \left (2 i b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {1}{3} \left (2 b^2 (-d)^{3/2} f^{3/2} n^2\right ) \int \frac {\text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx-\frac {1}{3} \left (2 b^2 (-d)^{3/2} f^{3/2} n^2\right ) \int \frac {\text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.55, size = 585, normalized size = 1.08 \[ \frac {1}{27} \left (-2 d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (9 a^2+18 a b \left (\log \left (c x^n\right )-n \log (x)\right )+6 a b n+9 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+6 b^2 n \left (\log \left (c x^n\right )-n \log (x)\right )+2 b^2 n^2\right )-\frac {2 d f \left (9 a^2+6 b (3 a+b n) \log \left (c x^n\right )-6 b n \log (x) \left (3 a+3 b \log \left (c x^n\right )+b n\right )+6 a b n+9 b^2 \log ^2\left (c x^n\right )+9 b^2 n^2 \log ^2(x)+2 b^2 n^2\right )}{x}-\frac {\log \left (d f x^2+1\right ) \left (9 a^2+6 b (3 a+b n) \log \left (c x^n\right )+6 a b n+9 b^2 \log ^2\left (c x^n\right )+2 b^2 n^2\right )}{x^3}+\frac {6 i b d f n \left (\sqrt {d} \sqrt {f} x \left (\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )+\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )\right )-\sqrt {d} \sqrt {f} x \left (\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )\right )+2 i \log (x)+2 i\right ) \left (3 a+3 b \log \left (c x^n\right )-3 b n \log (x)+b n\right )}{x}+\frac {9 i b^2 d f n^2 \left (\sqrt {d} \sqrt {f} x \left (-2 \text {Li}_3\left (-i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )+\log ^2(x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )\right )-\sqrt {d} \sqrt {f} x \left (-2 \text {Li}_3\left (i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\log ^2(x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )\right )+2 i \log ^2(x)+4 i \log (x)+4 i\right )}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)])/x^4,x]

[Out]

(-2*d^(3/2)*f^(3/2)*ArcTan[Sqrt[d]*Sqrt[f]*x]*(9*a^2 + 6*a*b*n + 2*b^2*n^2 + 18*a*b*(-(n*Log[x]) + Log[c*x^n])
 + 6*b^2*n*(-(n*Log[x]) + Log[c*x^n]) + 9*b^2*(-(n*Log[x]) + Log[c*x^n])^2) - (2*d*f*(9*a^2 + 6*a*b*n + 2*b^2*
n^2 + 9*b^2*n^2*Log[x]^2 + 6*b*(3*a + b*n)*Log[c*x^n] + 9*b^2*Log[c*x^n]^2 - 6*b*n*Log[x]*(3*a + b*n + 3*b*Log
[c*x^n])))/x - ((9*a^2 + 6*a*b*n + 2*b^2*n^2 + 6*b*(3*a + b*n)*Log[c*x^n] + 9*b^2*Log[c*x^n]^2)*Log[1 + d*f*x^
2])/x^3 + ((6*I)*b*d*f*n*(3*a + b*n - 3*b*n*Log[x] + 3*b*Log[c*x^n])*(2*I + (2*I)*Log[x] + Sqrt[d]*Sqrt[f]*x*(
Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x]) - Sqrt[d]*Sqrt[f]*x*(Log[x]*Log[1 -
I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, I*Sqrt[d]*Sqrt[f]*x])))/x + ((9*I)*b^2*d*f*n^2*(4*I + (4*I)*Log[x] + (2*I)*L
og[x]^2 + Sqrt[d]*Sqrt[f]*x*(Log[x]^2*Log[1 + I*Sqrt[d]*Sqrt[f]*x] + 2*Log[x]*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*
x] - 2*PolyLog[3, (-I)*Sqrt[d]*Sqrt[f]*x]) - Sqrt[d]*Sqrt[f]*x*(Log[x]^2*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + 2*Log[
x]*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x] - 2*PolyLog[3, I*Sqrt[d]*Sqrt[f]*x])))/x)/27

________________________________________________________________________________________

fricas [F]  time = 0.59, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right )^{2} + 2 \, a b \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right ) + a^{2} \log \left (d f x^{2} + 1\right )}{x^{4}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^4,x, algorithm="fricas")

[Out]

integral((b^2*log(d*f*x^2 + 1)*log(c*x^n)^2 + 2*a*b*log(d*f*x^2 + 1)*log(c*x^n) + a^2*log(d*f*x^2 + 1))/x^4, x
)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )}{x^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^4,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*log((f*x^2 + 1/d)*d)/x^4, x)

________________________________________________________________________________________

maple [F]  time = 0.42, size = 0, normalized size = 0.00 \[ \int \frac {\left (b \ln \left (c \,x^{n}\right )+a \right )^{2} \ln \left (\left (f \,x^{2}+\frac {1}{d}\right ) d \right )}{x^{4}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*x^n)+a)^2*ln((f*x^2+1/d)*d)/x^4,x)

[Out]

int((b*ln(c*x^n)+a)^2*ln((f*x^2+1/d)*d)/x^4,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {{\left (9 \, b^{2} \log \left (x^{n}\right )^{2} + {\left (2 \, n^{2} + 6 \, n \log \relax (c) + 9 \, \log \relax (c)^{2}\right )} b^{2} + 6 \, a b {\left (n + 3 \, \log \relax (c)\right )} + 9 \, a^{2} + 6 \, {\left (b^{2} {\left (n + 3 \, \log \relax (c)\right )} + 3 \, a b\right )} \log \left (x^{n}\right )\right )} \log \left (d f x^{2} + 1\right )}{27 \, x^{3}} + \int \frac {2 \, {\left (9 \, b^{2} d f \log \left (x^{n}\right )^{2} + 9 \, a^{2} d f + 6 \, {\left (d f n + 3 \, d f \log \relax (c)\right )} a b + {\left (2 \, d f n^{2} + 6 \, d f n \log \relax (c) + 9 \, d f \log \relax (c)^{2}\right )} b^{2} + 6 \, {\left (3 \, a b d f + {\left (d f n + 3 \, d f \log \relax (c)\right )} b^{2}\right )} \log \left (x^{n}\right )\right )}}{27 \, {\left (d f x^{4} + x^{2}\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^4,x, algorithm="maxima")

[Out]

-1/27*(9*b^2*log(x^n)^2 + (2*n^2 + 6*n*log(c) + 9*log(c)^2)*b^2 + 6*a*b*(n + 3*log(c)) + 9*a^2 + 6*(b^2*(n + 3
*log(c)) + 3*a*b)*log(x^n))*log(d*f*x^2 + 1)/x^3 + integrate(2/27*(9*b^2*d*f*log(x^n)^2 + 9*a^2*d*f + 6*(d*f*n
 + 3*d*f*log(c))*a*b + (2*d*f*n^2 + 6*d*f*n*log(c) + 9*d*f*log(c)^2)*b^2 + 6*(3*a*b*d*f + (d*f*n + 3*d*f*log(c
))*b^2)*log(x^n))/(d*f*x^4 + x^2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^4} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n))^2)/x^4,x)

[Out]

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n))^2)/x^4, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*ln(d*(1/d+f*x**2))/x**4,x)

[Out]

Timed out

________________________________________________________________________________________